<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="docgen-resources/docgen.css" type="text/css">
  <meta name="generator" content="FreeMarker Docgen (DocBook 5)">
  <title>
    FreeMarker Manual - 2.3.9
  </title>
    <script type="text/javascript" src="docgen-resources/jquery.js"></script>
    <script type="text/javascript" src="docgen-resources/linktargetmarker.js"></script>
</head>
<body>

    <div class="navigation">
    <div class="breadcrumb">
<span class="breadcrumb">        You are here:
          <a href="index.html">Book</a>
            <b>></b>
          <a href="app.html">Appendixes</a>
            <b>></b>
          <a href="app_versions.html">Versions</a>
            <b>></b>
          2.3.9
</span>    </div>
    <div class="bookmarks">
<span class="bookmarks">Bookmarks:
<a href="alphaidx.html">Alpha. index</a>, <a href="gloss.html">Glossary</a>, <a href="dgui_template_exp.html#exp_cheatsheet">Expressions</a>, <a href="ref_builtins_alphaidx.html">?builtins</a>, <a href="ref_directive_alphaidx.html">#directives</a>, <a href="ref_specvar.html">.spec_vars</a>, <a href="app_faq.html">FAQ</a>, <a href="api/index.html">API</a>, <a href="../index.html">Home</a></span>    </div>
    <div class="pagers">
      <div class="pagersVerticalSpacer"><img src="docgen-resources/img/none.gif" width="1" height="1" alt="" hspace="0" vspace="0" border="0"/></div>
<div class="pagerButton"><a href="versions_2_3_8.html"><span class="hideA">Next page: </span>2.3.8</a></div><div class="pagerButton"><a href="versions_2_3_10.html">Previous page</a></div><div class="pagerButton"><a href="app_versions.html">Parent page</a></div><div class="pagerButton"><a href="index.html">Contents</a></div>      <div class="pagersVerticalSpacer"><img src="docgen-resources/img/none.gif" width="1" height="1" alt="" hspace="0" vspace="0" border="0"/></div>
    </div>
    </div>

<div id="mainContent">

  
  
  
  
  <h1 class="rank_section1"
        id="pageTopTitle">
<a name="versions_2_3_9"></a>2.3.9  </h1>
    
    
<p>Date of release: 2007-01-23</p><p>This release contains support for accessing JDK 1.5 enums and
        public fields of classes from the templates through the
        BeansWrapper.</p>
            
  
  
  
  <h2 class="rank_section2"
        >
<a name="autoid_158"></a>Changes on the Java side  </h2>


              <div class="itemizedlist">
<ul>
            <li>
              <p><tt style="color: #A03D10">BeansWrapper</tt> can now expose public
              fields of objects to the template if you call the
              <tt style="color: #A03D10">setExposeFields(true)</tt> on it. <a href="pgui_misc_beanwrapper.html#beanswrapper_hash">More info...</a></p>
            </li>

            <li>
              <p><tt style="color: #A03D10">BeansWrapper</tt> can now pass any sequence
              model to Java methods expecting a
              <tt style="color: #A03D10">java.util.Collection</tt> or a native Java array
              (including primitive arrays). <a href="pgui_misc_beanwrapper.html#beanswrapper_hash">More info...</a></p>
            </li>

            <li>
              <p><tt style="color: #A03D10">BeansWrapper</tt> can now pass any sequence
              and collection model to Java methods expecting a
              <tt style="color: #A03D10">java.lang.Iterable</tt>. <a href="pgui_misc_beanwrapper.html#beanswrapper_hash">More info...</a></p>
            </li>

            <li>
              <p><tt style="color: #A03D10">BeansWrapper</tt> can now unwrap numeric
              models into correct target types when passing to Java methods
              expecting a primitive or boxed number. Use of various <a href="ref_builtins_expert.html">expert built-ins</a> to
              manually coerce the types becomes mostly unnecessary.</p>
            </li>

            <li>
              <p>Fixed a bug where <tt style="color: #A03D10">BeansWrapper</tt> would
              pass a <tt style="color: #A03D10">java.util.Collection</tt> to a method
              expecting a <tt style="color: #A03D10">java.util.Set</tt> in certain rare
              cases. <a href="pgui_misc_beanwrapper.html#beanswrapper_hash">More
              info...</a></p>
            </li>

            <li>
              <p>Support for JDK 1.5 enums in
              <tt style="color: #A03D10">BeansWrapper</tt> and
              <tt style="color: #A03D10">DefaultObjectWrapper</tt>. By calling the
              <tt style="color: #A03D10">getEnumModels()</tt> method, you can retrieve a
              hash model that is keyed by class names and allows access to
              enumerated values. I.e. if you bind this hash model under name
              <tt style="color: #A03D10">enums</tt> in the data-model, you can write
              expressions like
              <tt style="color: #A03D10">enums[&quot;java.math.RoundingMode&quot;].UP</tt> in the
              template. The enum values can be used as scalars and support
              equality and inequality comparisons. <a href="pgui_misc_beanwrapper.html#jdk_15_enums">More info...</a></p>
            </li>

            <li>
              <p><tt style="color: #A03D10">freemarker.ext.rhino.RhinoWrapper</tt> now
              correctly translates Rhino <tt style="color: #A03D10">Undefined</tt>
              instance, <tt style="color: #A03D10">UniqueTag.NOT_FOUND</tt>, and
              <tt style="color: #A03D10">UniqueTag.NULL</tt> to FreeMarker undefined
              value.</p>
            </li>
          </ul>    </div>

          
</div>

    <div class="navigation">
    <div class="pagers">
      <div class="pagersVerticalSpacer"><img src="docgen-resources/img/none.gif" width="1" height="1" alt="" hspace="0" vspace="0" border="0"/></div>
<div class="pagerButton"><a href="versions_2_3_8.html"><span class="hideA">Next page: </span>2.3.8</a></div><div class="pagerButton"><a href="versions_2_3_10.html">Previous page</a></div><div class="pagerButton"><a href="app_versions.html">Parent page</a></div><div class="pagerButton"><a href="index.html">Contents</a></div>      <div class="pagersVerticalSpacer"><img src="docgen-resources/img/none.gif" width="1" height="1" alt="" hspace="0" vspace="0" border="0"/></div>
    </div>
    <div class="breadcrumb">
<span class="breadcrumb">        You are here:
          <a href="index.html">Book</a>
            <b>></b>
          <a href="app.html">Appendixes</a>
            <b>></b>
          <a href="app_versions.html">Versions</a>
            <b>></b>
          2.3.9
</span>    </div>
    </div>

<table border=0 cellspacing=0 cellpadding=0 width="100%">
    <tr>
      <td colspan=2><img src="docgen-resources/img/none.gif" width=1 height=8 alt=""></td>
    <tr>
      <td align="left" valign="top"><span class="smallFooter">
            FreeMarker Manual -- For FreeMarker 2.3.20
            <br>
          HTML generated: 2013-06-27 20:54:33 GMT
      </span></td>
      <td align="right" valign="top"><span class="smallFooter">
          <a href="http://www.xmlmind.com/xmleditor/">
            <img src="docgen-resources/img/xxe.gif" alt="Edited with XMLMind XML Editor">
          </a>
      </span></td>
    </tr>
</table>
  <!-- Put pre-loaded images here: -->
  <div style="display: none">
    <img src="docgen-resources/img/linktargetmarker.gif" alt="Here!" />
  </div>
</body>
</html>

